home *** CD-ROM | disk | FTP | other *** search
/ Learning Games / Learning Games (1995)(Maple Media).iso / camaze / readmeca.txt < prev   
Text File  |  1993-04-06  |  3KB  |  77 lines

  1. CA Maze
  2. Written by Ron Helwig using Borland Turbo C++.
  3.  
  4. The object of this program is to demonstrate one
  5. method of solving mazes. This version uses cellular
  6. automata to find the solution path(s).
  7.  
  8. Menu Commands
  9. -------------
  10. NEW    create a totally filled maze. The user specifies
  11. how large it should be, and then can edit it by clicking on
  12. squares with the left mouse button. Moving the mouse over
  13. the maze with the left mouse button pressed will toggle
  14. the squares on or off.
  15.  
  16. OPEN    load a maze file.
  17.  
  18. SAVE
  19. SAVE AS    save the file to disk. I use the filetype 'maz', but
  20. there is no restriction in this program.
  21.  
  22. ITERATIONS    asks the user how many iterations of the
  23. solution routine to do per click of the right mouse button.
  24.  
  25. SIZE    sets the size (in pixels) of each block. The maze is
  26. a simple two dimensional array of square blocks.
  27.  
  28. RESTORE    returns the maze to the last loaded or saved position.
  29.  
  30. RANDOM    changes the currently selected maze randomly. Note that 
  31. the maze may have no solution. It should be used as a starting 
  32. point for developing new mazes.
  33.  
  34. Left Mouse Button when clicked on a maze block will toggle the
  35. status of the block. A wall will become aisle, an aisle will
  36. become wall.
  37.  
  38. Right Mouse Button when clicked will perform one (or more)
  39. iteration(s) of solving the maze.
  40.  
  41. How it works
  42. ------------
  43. The program uses cellular automata to solve the maze. 
  44.  
  45. The maze:
  46. The maze consists of cells arranged in a 2 dimensional array.
  47.  
  48. The rules:
  49. 1) If an aisle cell is surrounded on three (or more) sides, it is
  50. obviously a dead end. In this case it is turned into a wall cell.
  51. example - WWW -> WWW
  52.       WaW -> WwW
  53.       ??? -> ???
  54.  
  55. 2) If an aisle cell is surrounded by two wall cells, make it a
  56. wall cell if it will not close the path.
  57. example - WWW? -> WWW?
  58.       WaA? -> WwA?
  59.       WAA? -> WAA?
  60.       ???? -> ????
  61.  
  62. In both of these cases, it can be seen that the path is not
  63. closed. However, in case 2, it might make a wide path thinner.
  64.  
  65.  
  66. This program is to be distributed as freeware. I don't care how
  67. or to whom you give this program. The purpose of this program was
  68. to teach myself basic MS-Windows and C++ programming. If you
  69. like it and/or have ideas for improving it, you may send comments
  70. to helwig@staff.tc.umn.edu (at least for as long as I have
  71. that account). I am planning to add printing capabilities
  72. later, but for now I have better things to do.
  73.  
  74. I got the idea for this program from a Dr. Dobb's Journal
  75. (Feb 1993) article about cellular automata. It contains the
  76. basic algorithm for a two-dimensional array of cells using
  77. the first rule.